<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAnswersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('answers', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('evaluate_id')->comment('评价表ID');
            $table->integer('resume_id')->comment('简历ID');
            $table->integer('flow_id')->comment('流程ID');
            $table->integer('step_id')->comment('步骤表ID');
            $table->text('value',2000)->nullable()->comment('评分字符串（五星)');
            $table->text('content',2000)->nullable()->comment('评分字符串（文本)');
            $table->string('score',255)->comment('评价得分');
            $table->tinyInteger('status')->default(0)->comment('是否删除 1：是 0：否');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `answers` comment '评价答案表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('answers');
    }
}
